package apiday02homework;

import java.util.Arrays;

public class PracticeE {
    public static void main(String[] args) {
        String path = "http://localhost:8088/myweb/reg?name" +
                "=zhangsan&pwd=123456&nick=san&a" +
                "ge=16";
        String[] data = path.split("/");
        System.out.println(Arrays.toString(data));
        String str1 = data[4];
        String[] data1 = str1.split("[?=&]+");
        System.out.println(Arrays.toString(data1));
        for (int i = 1; i < data1.length; i += 2) {
            System.out.println("参数名："+data1[i]+"参数值："+data1[i+1]);
        }
    }
}
